package com.campus.bbs;

import java.util.ArrayList;


import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class DetailHelper {

	public static ArrayList resp(String get)
	{
		
		ArrayList<DetailInfo> list=new ArrayList();
		Document doc=Jsoup.parse(get);
		Elements e=doc.select("div.i");
		for(Element ee:e)
		{
			DetailInfo info=new DetailInfo();
			System.out.println(ee.toString().substring(17,ee.toString().indexOf("<br")-1));
			System.out.println(ee.select("span.g").text());
			System.out.println(ee.select("span.b").text());
			info.from=ee.select("span.g").text()+ee.select("span.b").text();
			info.content=ee.toString().substring(16,ee.toString().indexOf("<b")-1);
			list.add(info);
			
		}
		return list;
		
	}

}
